<!DOCTYPE html>
<html>
<#include "../head.html">
    <body>
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->
                <#assign fd="FINANCE_DIRECTOR">
                    <!--面包屑导航---{-->
                    <#assign moduleName="客户资金信息">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">


                                <#if esd  == auth_user.userType.code>
                                    <div class="toolbor-module export" style="margin-top:14;">
                                        <input type="button" onclick="exportinvestxls()" value="已投资导出" class="input-button export-btn"/>
                                        <input type="button" onclick="exportxls()" value="未投资导出" class="input-button export-btn"/>
                                    </div>
                                </#if>
                                <div class="toolbor-module search">


                                    <input type="checkbox" id="oneKeySyn" name="oneKeySyn" <#if oType??&&oType=="oneKeySyn">checked="checked"</#if>>一键筛选

                                    <#if fd  == auth_user.userType.code>
                                        <div class="formTit">
                                            理财经理：

                                        </div>
                                        <select id="fmId" name="fmId" style="min-width:124px; color:#000; height:24px;" class="search-value">
                                            <option value="0">全部</option>
                                            <#if fdList??>
                                                <#list fdList as item>
                                                    <#if item??>
                                                        <option value="${item.userId}" <#if item.userId ==fmId>selected<#else></#if>>${item.realname!''}</option>
                                                    </#if>
                                                </#list>
                                            </#if>
                                        </select>
                                    </#if>



                                    <div class="formTit">姓名 ：</div>
                                    <input type="text" name="realName" id="realName" class="search-value" value="${realName!''}">

                                    <div class="formTit" value="${phone!''}">手机：</div>
                                    <input type="text" name="phone" id="phone" class="search-value">

                                    <input type="button" value="搜索"  class="input-button" style="float:none" onclick="sousuo();">

                                </div>
                            </div>


                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form id="batchForm" action="#" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>用户名</td>
                                            <td>姓名</td>
                                            <td>手机</td>
                                            <td>注册时间</td>
                                            <td>理财经理</td>
                                            <td>投资准备金</td>
                                            <td>操作</td>
                                        </tr>
                                        <#list list as item>
                                            <tr class="s">
                                                <td>${item.id!0}</td>
                                                <td>${item.user.userName!''}</td>
                                                <td>${item.custName!''}</td>
                                                <td>${item.user.phone!''}</td>
                                                <td><#if item.user.addTime ??>${(item.user.addTime)?string("yyyy-MM-dd HH:mm:ss")}<#else>--</#if></td>
                                                <td>${item.systemUser.realname!''}</td>
                                                <td>${item.user.account.balance!0}</td>
                                                <td>
                                                    <a class="un" href="/admin/crm/addTrackRecord.html?custId=${(item.id!0)?c}&custName=${item.custName!''}">跟踪</a>
                                                    <a class="un" href="/admin/crm/showUserTrackRecord.html?custId=${(item.id!0)?c}">查看跟踪记录</a>
                                                    <a class="un" onclick='alertPop("账户信息","url:get?viewUserDetail.html?userId=${item.user.userId?c}",550,200,"true","","true","text");' href="javascript:void(0)">查看账户详情</a>
                                                </td>
                                            </tr>
                                        </#list>
                                    </table>
                                </form>


                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>
                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->


                                <script>
                                    var url = 'queryAccount.html?search=true';

                                    function sousuo(){
                                        var sou = "";
                                        var fmId = $("#fmId").val();
                                        var realName = $("#realName").val();
                                        var phone = $("#phone").val();
                                        if((realName!=null&&realName!=""&&realName!="undefined"&&realName!="请输入姓名关键字")){
                                            sou += "&realName="+realName;
                                        }
                                        if($('#oneKeySyn')[0].checked){
                                            sou += "&oType=oneKeySyn";
                                        }
                                        if((phone!=null&&phone!=""&&phone!="undefined"&&phone!="请输入手机关键字")){
                                            sou += "&phone="+phone;
                                        }
                                        if((fmId!=null&&fmId!=""&&fmId!="undefined")){
                                            sou += "&fmId="+fmId;
                                        }

                                        if (sou!=""){
                                            location.href=url+sou;
                                        }
                                    }
                                    $("#phone")[0].defaultValue=getQueryString("phone","请输入手机关键字");
                                    $("#realName")[0].defaultValue==getQueryString("realName","请输入姓名关键字");
                                    function getQueryString(name,tip){
                                        var reg=new  RegExp("(^|&)"+name+"=([^&]*)(&|$)");
                                        var r =window.location.search.substr(1).match(reg);
                                        if(r!=null)
                                            return  decodeURI(r[2]);
                                        return  tip;
                                    }

                                    function exportinvestxls(){
                                        location.href='queryAccount.html?export=export&invest=invest';
                                    }

                                    function exportxls(){
                                        var num='${(page.total)?c}';
                                        num=num.replace(",","");
                                        if(num>30000){ //条数自己定义，但必须小于65536
                                            alert("数据过多，请选择指定的时间进行数据查询导出！"); //提示信息根据不同的内容注意修改下。
                                            return false;
                                        }
                                        location.href='queryAccount.html?export=export';
                                    }


                                </script>
                            </div>
        </div>
    </div>
    <div class="mc-b">
        <#include "../foot.html">
    </div>
    <#include "../jsPage.html">
    </body>
</html>
